package customer

import (
	"context"
	"git.mycaigou.com/gfyx/micro-gfyx-user-service/infrastructure/common/utils"
)

type CustomerGroupRepositoryIface interface {
	SaveCustomerGroup(ctx context.Context, po *CustomerGroupPo) (*CustomerGroupPo, error)
	SaveCustomerGroupTenantRelation(ctx context.Context, po *CustomerGroupPo, tenantCode []string) error
	QueryCustomerGroupList(ctx context.Context, condition map[string]interface{}, pageInfo *utils.PageInfo, orderBy string) (int64, []*GroupListItem, error)
	GetCustomerGroupDetail(ctx context.Context, customerGroupId int64) (*CustomerGroupPo, error)
	GetCustomerGroupTenantRelation(ctx context.Context, customerGroupId int64) ([]string, error)
	DeleteCustomerGroup(ctx context.Context, customerGroupId int64) error
	IsRepeatTitle(ctx context.Context, title string, id int64) (bool, error)
	GetAllCustomerGroupIds(ctx context.Context) ([]int64, error)
	UpdateCustomerGroupTotalById(ctx context.Context, id int64, total int32) error
}
